package cn.smbms.service.role;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.smbms.dao.role.RoleDao;
import cn.smbms.dao.role.RoleDaoImpl;
import cn.smbms.pojo.Role;

@Transactional
@Service("roleService")
public class RoleServiceImpl implements RoleService{
	
	@Autowired
	@Qualifier("roleDao")
	private RoleDao roleDao;
	public RoleServiceImpl(){
		roleDao=new RoleDaoImpl();
	}
	
	@Transactional(propagation=Propagation.SUPPORTS)
	public List<Role> getRoleList() {
		// TODO Auto-generated method stub
		try {
			return roleDao.getRoleList();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			throw e;
		}
	}
	
}
